package com.zust.data.dal;

import com.zust.data.entity.DlUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

/**
 * @author senselyan
 * @Description:
 * @date 2018/4/4 16:19
 */
public interface UserRepository extends DefaultDatabaseRepository<DlUser> {

//    public interface UserRepository extends MongoRepository<DlUser,String> {

    Page<DlUser> findByDeletedFlag(Integer deletedFlag, Pageable pageable);

    DlUser findByEmailAndDeletedFlag(String email, Integer deletedFlag);

    long countAllByEmailAndDeletedFlag(String email, Integer deletedFlag);

}
